import { sysConfig } from '@/api/interface/interface';
import { defineStore } from 'pinia';

/**
 * 存入参数
 */
export const configStore = defineStore('config', {
    state: () => {  // 存放的就是模块的变量
        return {
            app: {
                coin_name: "", //游戏币名称
                distribution_name: "", //分销中心页面标题
                site_name: "抓多多", //应用名称
                corpId: '', // 企业微信企业id
                workweixin_kefu_url: '', // 企业微信客服连接
                douyin_kefu_id: '', // 抖音客服id
                index_device_switch: '', //首页控制显示
                site_beian: '',//备案号,
                ios_h5pay: 2
            },
            douyin_use_is_show: 0,
            recharge: 0,
            sysConfig: {}
        }
    },
    actions: {
        setApp(data: any) {
            this.app = data;
        },
        setSysConfig(data: any) {
            this.sysConfig = data;
        },
        setDouyinIsShow(data: number) {
            this.douyin_use_is_show = data;
        },
        setRecharge(data: number) {
            this.recharge = data;
        }
    }
});